package com.soft.collateral.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel("入库申请表")
@TableName("storage_apply")
@NoArgsConstructor
@AllArgsConstructor
public class StorageApply {
    @TableId(value = "apply_id", type = IdType.AUTO)
    @ApiModelProperty("申请ID")
    private Integer applyId;

    @TableField("apply_type")
    @ApiModelProperty("申请类型(1:正常入库,2:置换入库)")
    private Integer applyType;

    @TableField("apply_user")
    @ApiModelProperty("申请人")
    private String applyUser;

    @TableField(value = "apply_time",fill = FieldFill.INSERT)
    @ApiModelProperty("申请时间")
    private LocalDateTime applyTime;

    @TableField("description")
    @ApiModelProperty("描述")
    private String description;

    @TableField("status")
    @ApiModelProperty("状态(0:草稿,1:待审核,2:已通过,3:已拒绝)")
    private Integer status;

    @TableField(exist = false)
    @ApiModelProperty("入库申请明细列表")
    private List<StorageApplyDetail> details;

    @TableField(exist = false)
    @ApiModelProperty("审核记录")
    private StorageApproval approval;
}